{% extends 'base.html' %}

{% block title %}橘子问答-首页{% endblock title %}

{% block content %}
    <div class="row">
        <div class="col-1"></div>
        <div class="col-10">
            <div class="list-group" style="margin-top: 25px;">
                {% for question in questions %}
                    <a href="{{ url_for('qa.question_detail', question_id=question.id) }}" class="list-group-item list-group-item-action">
                        <div class="d-flex w-100 justify-content-between">
                        <h5 class="mb-1">{{question.title}}</h5>
                        <small>{{question.create_time}}</small>
                        </div>
                        <p class="mb-1">{{question.content}}</p>
                        <small>{{question.author.username}}</small>
                    </a>
                {% endfor %}
            </div>
        </div>
        <div class="col-1"></div>
    </div>
{% endblock content %}